home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-04-07 | 8.8 KB | 432 lines | [TEXT/EMAC] |
- ;;;
- ;;; This file is part of a Macintosh port of GNU Emacs.
- ;;;
- ;;; GNU Emacs is distributed in the hope that it will be useful,
- ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
- ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- ;;; GNU General Public License for more details.
- ;;;
-
- (defconst HiliteMode (hex-string-to-int "938"))
- (defconst pHiliteBit 0)
-
- (defconst white (make-string 8 0))
- (defconst ltGray "\" à \" à ")
- (defconst gray "™U™U™U™U")
- (defconst black (make-string 8 255))
-
- (defconst srcCopy 0)
- (defconst srcOr 1)
- (defconst srcXor 2)
- (defconst srcBic 3)
- (defconst notSrcCopy 4)
- (defconst notSrcOr 5)
- (defconst notSrcXor 6)
- (defconst notSrcBic 7)
- (defconst patCopy 8)
- (defconst patOr 9)
- (defconst patXor 10)
- (defconst patBic 11)
- (defconst notPatCopy 12)
- (defconst notPatOr 13)
- (defconst notPatXor 14)
- (defconst notPatBic 15)
-
- (defconst blend 32)
- (defconst addPin 33)
- (defconst addOver 34)
- (defconst subPin 35)
- (defconst transparent 36)
- (defconst addMax 37)
- (defconst adMax 37)
- (defconst subOver 38)
- (defconst adMin 39)
- (defconst grayishTextOr 49)
- (defconst ditherCopy 64)
-
- (defconst clutType 0)
- (defconst directType 2)
-
- (c:defstruct Point ((short v)
- (short h)))
-
- (c:defstruct Rect ((short top)
- (short left)
- (short bottom)
- (short right)))
-
- (c:defstruct BitMap ((long baseAddr)
- (short rowBytes)
- (Rect bounds)))
-
- (c:defstruct RGBColor ((unsigned-short red)
- (unsigned-short green)
- (unsigned-short blue)))
-
- (c:typedef Pattern (array char 8))
-
- (c:typedef Style char)
-
- (c:defstruct Region ((short rgnSize)
- (Rect rgnBBox)))
- (c:typedef RgnHandle (ptr ptr . Region))
-
- (c:typedef ITabHandle Handle)
- (c:typedef SProcHndl Handle)
- (c:typedef CProcHndl Handle)
-
- (c:defstruct ColorSpec ((short value)
- (RGBColor rgb)))
-
- (c:defstruct ColorTable ((long ctSeed)
- (short ctFlags)
- (short ctSize)
- ((array ColorSpec 0) ctTable)))
- (c:typedef CTabPtr (ptr . ColorTable))
- (c:typedef CTabHandle (ptr ptr . ColorTable))
-
- (c:defstruct PixMap ((Ptr baseAddr)
- (short rowBytes)
- (Rect bounds)
- (short pmVersion)
- (short packType)
- (long packSize)
- (Fixed hRes)
- (Fixed vRes)
- (short pixelType)
- (short pixelSize)
- (short cmpCount)
- (short cmpSize)
- (long planeBytes)
- (CTabHandle pmTable)
- (long pmReserved)))
- (c:typedef PixMapHandle (ptr ptr . PixMap))
-
- (c:defstruct GrafPort ((short device)
- (BitMap portBits)
- (Rect portRect)
- (RgnHandle visRgn)
- (RgnHandle clipRgn)
- (Pattern bkPat)
- (Pattern fillPat)
- (Point pnLoc)
- (Point pnSize)
- (short pnMode)
- (Pattern pnPat)
- (short pnVis)
- (short txFont)
- (Style txFace)
- (char filler)
- (short txMode)
- (short txSize)
- (Fixed spExtra)
- (long fgColor)
- (long bkColor)
- (short colrBit)
- (short patStretch)
- (Handle picSave)
- (Handle rgnSave)
- (Handle polySave)
- (Ptr grafProcs)))
- (c:typedef GrafPtr (ptr . GrafPort))
-
- (c:defstruct GDevice ((short gdRefNum)
- (short gdID)
- (short gdType)
- (ITabHandle gdITable)
- (short gdResPref)
- (SProcHndl gdSearchProc)
- (CProcHndl gdCompProc)
- (short gdFlags)
- (PixMapHandle gdPMap)
- (long gdRefCon)
- (Handle gdNextGD)
- (Rect gdRect)
- (long gdMode)
- (short gdCCBytes)
- (short gdCCDepth)
- (Handle gdCCXData)
- (Handle gdCCXMask)
- (long gdReserved)))
- (c:typedef GDHandle (ptr ptr . GDevice))
-
- ; pascal void InitCursor(void)
- ; = 0xA850;
- (deftrap InitCursor ("a850")
- nil
- nil)
-
- (deftrap MoveTo ("A893") ((h short) (v short)) nil)
- (deftrap LineTo ("A891") ((h short) (v short)) nil)
-
- ; pascal void SetPort(GrafPtr port)
- ; = 0xA873;
- (deftrap SetPort ("a873")
- ((port long))
- nil)
-
- ; pascal RgnHandle NewRgn(void)
- ; = 0xA8D8;
- (deftrap NewRgn ("a8d8")
- nil
- long)
-
- ; pascal void RectRgn(RgnHandle rgn,const Rect *r)
- ; = 0xA8DF;
- (deftrap RectRgn ("a8df")
- ((rgn long)
- (r address))
- nil)
-
- ; pascal void DiffRgn(RgnHandle srcRgnA,RgnHandle srcRgnB,RgnHandle dstRgn)
- ; = 0xA8E6;
- (deftrap DiffRgn ("a8e6")
- ((srcRgnA long)
- (srcRgnB long)
- (dstRgn long))
- nil)
-
- ; pascal void SetClip(RgnHandle rgn)
- ; = 0xA879;
- (deftrap SetClip ("a879")
- ((rgn long))
- nil)
-
- ; pascal void ClipRect(const Rect *r)
- ; = 0xA87B;
- (deftrap ClipRect ("a87b")
- ((r address))
- nil)
-
- ; pascal void DisposeRgn(RgnHandle rgn)
- ; = 0xA8D9;
- (deftrap DisposeRgn ("a8d9")
- ((rgn long))
- nil)
-
- ; pascal void TextMode(short mode)
- ; = 0xA889;
- (deftrap TextMode ("a889")
- ((mode short))
- nil)
-
- ; pascal void TextFont(short font)
- ; = 0xA887;
- (deftrap TextFont ("a887")
- ((font short))
- nil)
-
- ; pascal void TextSize(short size)
- ; = 0xA88A;
- (deftrap TextSize ("a88a")
- ((size short))
- nil)
-
- ; pascal void DrawString(ConstStr255Param s)
- ; = 0xA884;
- (deftrap DrawString ("a884")
- ((s address))
- nil)
-
- ; pascal void DrawChar(short ch)
- ; = 0xA883;
- (deftrap DrawChar ("a883")
- ((ch short))
- nil)
-
- ; pascal short StringWidth(ConstStr255Param s)
- ; = 0xA88C;
- (deftrap StringWidth ("a88c")
- ((s address))
- short)
-
- ; pascal void OffsetRect(Rect *r,short dh,short dv)
- ; = 0xA8A8;
- (deftrap OffsetRect ("a8a8")
- ((Rect address)
- (dh short)
- (dv short))
- nil)
-
- ; pascal void DrawPicture(PicHandle myPicture,const Rect *dstRect)
- ; = 0xA8F6;
- (deftrap DrawPicture ("a8f6")
- ((myPicture address)
- (dstRect address))
- nil)
-
- ; pascal void FrameRect(const Rect *r)
- ; = 0xA8A1;
- (deftrap FrameRect ("a8a1")
- ((r address))
- nil)
-
- ; pascal void PaintRect(const Rect *r)
- ; = 0xA8A2;
- (deftrap PaintRect ("a8a2")
- ((r address))
- nil)
-
- ; pascal void InvertRect(const Rect *r)
- ; = 0xA8A2;
- (deftrap InvertRect ("a8a4")
- ((r address))
- nil)
-
- ; pascal GDHandle GetMainDevice(void)
- ; = 0xAA2A;
- (deftrap GetMainDevice ("aa2a")
- nil
- long)
-
- ; pascal GDHandle GetDeviceList(void)
- ; ONEWORDINLINE(0xAA29);
- (deftrap GetDeviceList ("aa29")
- nil
- long)
-
- ; extern pascal GDHandle GetNextDevice(GDHandle curDevice)
- ; ONEWORDINLINE(0xAA2B);
- (deftrap GetNextDevice ("aa2b")
- ((curDevice long))
- long)
-
- ; pascal void OpenPort(GrafPtr port)
- ; = 0xA86F;
- (deftrap OpenPort ("a86f")
- ((port long))
- nil)
-
- ; pascal void SetPortBits(const BitMap *bm)
- ; = 0xA875;
- (deftrap SetPortBits ("a875")
- ((bm address))
- nil)
-
- ; pascal void EraseRect(const Rect *r)
- ; = 0xA8A3;
- (deftrap EraseRect ("a8a3")
- ((r address))
- nil)
-
- ; pascal void CopyBits(const BitMap *srcBits,const BitMap *dstBits,const Rect *srcRect,
- ; const Rect *dstRect,short mode,RgnHandle maskRgn)
- ; = 0xA8EC;
- (deftrap CopyBits ("a8ec")
- ((srcBits address)
- (dstBits address)
- (srcRect address)
- (dstRect address)
- (mode short)
- (maskRgn long))
- nil)
-
- ; pascal void ClosePort(GrafPtr port)
- ; = 0xA87D;
- (deftrap ClosePort ("a87d")
- ((port long))
- nil)
-
- ; pascal void RGBForeColor(const RGBColor *color)
- ; = 0xAA14;
- (deftrap RGBForeColor ("aa14")
- ((color address))
- nil)
-
- ; pascal void RGBBackColor(const RGBColor *color)
- ; = 0xAA15;
- (deftrap RGBBackColor ("aa15")
- ((color address))
- nil)
-
- ; pascal void HiliteColor(const RGBColor *color)
- ; = 0xAA22;
- (deftrap HiliteColor ("aa22")
- ((color address))
- nil)
-
- ; pascal void GlobalToLocal(Point *pt)
- ; = 0xA871;
- (deftrap GlobalToLocal ("a871")
- ((pt address))
- nil)
-
- ; extern pascal void LocalToGlobal(Point *pt)
- ; ONEWORDINLINE(0xA870);
- (deftrap LocalToGlobal ("a870")
- ((pt address))
- nil)
-
- ; pascal Boolean PtInRect(Point pt,const Rect *r)
- ; = 0xA8AD;
- (deftrap PtInRect ("a8ad")
- ((pt immediate-string)
- (r address))
- char)
-
- ; pascal void PenMode(short mode)
- ; = 0xA89C;
- (deftrap PenMode ("a89c")
- ((mode short))
- nil)
-
- ; pascal void PenSize(short width,short height)
- ; = 0xA89B;
- (deftrap PenSize ("a89b")
- ((width short)
- (height short))
- nil)
-
- ; pascal void PenPat(ConstPatternParam pat)
- ; = 0xA89D;
- (deftrap PenPat ("a89d")
- ((pat address))
- nil)
-
- ; pascal void InsetRect(Rect *r,short dh,short dv)
- ; = 0xA8A9;
- (deftrap InsetRect ("a8a9")
- ((r address)
- (dh short)
- (dv short))
- nil)
-
- ; extern pascal Boolean SectRect(const Rect *src1, const Rect *src2, Rect *dstRect)
- ; ONEWORDINLINE(0xA8AA);
- (deftrap SectRect ("a8aa")
- ((src1 address)
- (src2 address)
- (dstRect address))
- char)
-
- ; pascal void SetRect(Rect *r,short left,short top,short right,short bottom)
- ; = 0xA8A7
- (deftrap SetRect ("a8a7")
- ((r address)
- (left short)
- (top short)
- (right short)
- (bottom short))
- nil)
-
- ; pascal void FrameRoundRect(const Rect *r,short ovalWidth,short ovalHeight)
- ; = 0xA8B0;
- (deftrap FrameRoundRect ("a8b0")
- ((r address)
- (ovalWidth short)
- (ovalHeight short))
- nil)
-
- ; pascal void PenNormal(void)
- ; = 0xA89E;
- (deftrap PenNormal ("a89e")
- nil
- nil)
-
- ; pascal Boolean EqualPt(Point pt1,Point pt2)
- ; = 0xA881;
- (deftrap EqualPt ("a881")
- ((pt1 immediate-string)
- (pt2 immediate-string))
- char)
-